\(\int \frac {x^{-1+n}}{b x^n+c x^{2 n}} \, dx\) [496]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 23 \[ \int \frac {x^{-1+n}}{b x^n+c x^{2 n}} \, dx=\frac {\log (x)}{b}-\frac {\log \left (b+c x^n\right )}{b n} \]

[Out]

ln(x)/b-ln(b+c*x^n)/b/n

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {1598, 272, 36, 29, 31} \[ \int \frac {x^{-1+n}}{b x^n+c x^{2 n}} \, dx=\frac {\log (x)}{b}-\frac {\log \left (b+c x^n\right )}{b n} \]

[In]

Int[x^(-1 + n)/(b*x^n + c*x^(2*n)),x]

[Out]

Log[x]/b - Log[b + c*x^n]/(b*n)

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 1598

Int[(u_.)*(x_)^(m_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(m + n*p)*(a + b*x^(q -
 p))^n, x] /; FreeQ[{a, b, m, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{x \left (b+c x^n\right )} \, dx \\ & = \frac {\text {Subst}\left (\int \frac {1}{x (b+c x)} \, dx,x,x^n\right )}{n} \\ & = \frac {\text {Subst}\left (\int \frac {1}{x} \, dx,x,x^n\right )}{b n}-\frac {c \text {Subst}\left (\int \frac {1}{b+c x} \, dx,x,x^n\right )}{b n} \\ & = \frac {\log (x)}{b}-\frac {\log \left (b+c x^n\right )}{b n} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.09 \[ \int \frac {x^{-1+n}}{b x^n+c x^{2 n}} \, dx=\frac {\log \left (x^n\right )-\log \left (b n \left (b+c x^n\right )\right )}{b n} \]

[In]

Integrate[x^(-1 + n)/(b*x^n + c*x^(2*n)),x]

[Out]

(Log[x^n] - Log[b*n*(b + c*x^n)])/(b*n)

Maple [A] (verified)

Time = 0.64 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.13

method result size
norman \(\frac {\ln \left (x \right )}{b}-\frac {\ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}+b \right )}{b n}\) \(26\)
risch \(\frac {\ln \left (x \right )}{b}-\frac {\ln \left (x^{n}+\frac {b}{c}\right )}{b n}\) \(26\)

[In]

int(x^(-1+n)/(b*x^n+c*x^(2*n)),x,method=_RETURNVERBOSE)

[Out]

ln(x)/b-1/b/n*ln(c*exp(n*ln(x))+b)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.96 \[ \int \frac {x^{-1+n}}{b x^n+c x^{2 n}} \, dx=\frac {n \log \left (x\right ) - \log \left (c x^{n} + b\right )}{b n} \]

[In]

integrate(x^(-1+n)/(b*x^n+c*x^(2*n)),x, algorithm="fricas")

[Out]

(n*log(x) - log(c*x^n + b))/(b*n)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 54 vs. \(2 (15) = 30\).

Time = 1.74 (sec) , antiderivative size = 54, normalized size of antiderivative = 2.35 \[ \int \frac {x^{-1+n}}{b x^n+c x^{2 n}} \, dx=\begin {cases} \tilde {\infty } \log {\left (x \right )} & \text {for}\: b = 0 \wedge c = 0 \wedge n = 0 \\- \frac {x x^{- 2 n} x^{n - 1}}{c n} & \text {for}\: b = 0 \\\frac {\log {\left (x \right )}}{b} & \text {for}\: c = 0 \\\frac {\log {\left (x \right )}}{b + c} & \text {for}\: n = 0 \\\frac {2 \log {\left (x \right )}}{b} - \frac {\log {\left (\frac {b x^{n}}{c} + x^{2 n} \right )}}{b n} & \text {otherwise} \end {cases} \]

[In]

integrate(x**(-1+n)/(b*x**n+c*x**(2*n)),x)

[Out]

Piecewise((zoo*log(x), Eq(b, 0) & Eq(c, 0) & Eq(n, 0)), (-x*x**(n - 1)/(c*n*x**(2*n)), Eq(b, 0)), (log(x)/b, E
q(c, 0)), (log(x)/(b + c), Eq(n, 0)), (2*log(x)/b - log(b*x**n/c + x**(2*n))/(b*n), True))

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.17 \[ \int \frac {x^{-1+n}}{b x^n+c x^{2 n}} \, dx=\frac {\log \left (x\right )}{b} - \frac {\log \left (\frac {c x^{n} + b}{c}\right )}{b n} \]

[In]

integrate(x^(-1+n)/(b*x^n+c*x^(2*n)),x, algorithm="maxima")

[Out]

log(x)/b - log((c*x^n + b)/c)/(b*n)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.09 \[ \int \frac {x^{-1+n}}{b x^n+c x^{2 n}} \, dx=\frac {\log \left ({\left | x \right |}\right )}{b} - \frac {\log \left ({\left | c x^{n} + b \right |}\right )}{b n} \]

[In]

integrate(x^(-1+n)/(b*x^n+c*x^(2*n)),x, algorithm="giac")

[Out]

log(abs(x))/b - log(abs(c*x^n + b))/(b*n)

Mupad [B] (verification not implemented)

Time = 8.71 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.87 \[ \int \frac {x^{-1+n}}{b x^n+c x^{2 n}} \, dx=-\frac {2\,\mathrm {atanh}\left (\frac {2\,c\,x^n}{b}+1\right )}{b\,n} \]

[In]

int(x^(n - 1)/(b*x^n + c*x^(2*n)),x)

[Out]

-(2*atanh((2*c*x^n)/b + 1))/(b*n)